<?php		ob_start(); 
    include_once '../includes/session.php';
	 header("Cache-control: private"); 
    include_once '../includes/constants.php';
    include_once '../includes/functions.php';
	include_once '../includes/function1.php';
    include '../includes/allstripslashes.php';

    $Act=$_GET['Act'];
 
    if(!empty($_POST['languageid'])) $_SESSION['LANGUAGE'] = $_POST['languageid'];
    $language=$_SESSION['LANGUAGE'];



    $partners	=new partners;
    $partners->connection($host,$user,$pass,$db);

    if(!$partners->isMerchantlogin())
    {
     header("Location:../index.php?Act=merchant");
     exit;
    }

    $MERCHANTID = $mid 	= $_SESSION['MERCHANTID'] ;

    $sql_merchant	=	"select * from merchant_pay where pay_merchantid=$mid  ";
    $ret_merchant	=	@mysql_query($sql_merchant);
    $row_merchant	=	@mysql_fetch_object($ret_merchant);

    # get currency values
    $currSql = " SELECT * FROM partners_currency, partners_merchant WHERE merchant_id = $mid and currency_caption = merchant_currency";
    $currRet = @mysql_query($currSql);

    if(@mysql_num_rows($currRet)>0){
     	$currRow = @mysql_fetch_object($currRet);
        $currSymbol = stripslashes($currRow->currency_symbol);
        $currValue = stripslashes($currRow->currency_caption);
		$currCode = stripslashes($currRow->currency_code);
    }


    $_SESSION['MERCHANTBALANCE'] = $row_merchant->pay_amount;


//Added for base Currency
	$cur_sql = "SELECT * FROM partners_currency WHERE currency_code='$default_currency_code' ";
	$res_cur = mysql_query($cur_sql);
	if(mysql_num_rows($res_cur) > 0)
	{
		$row_cur = mysql_fetch_object($res_cur);
		$basecurrSymbol = stripslashes($row_cur->currency_symbol);
		$_SESSION['DEFAULTCURRENCYSYMBOL'] = $basecurrSymbol;
	}
//End Add fro base Currency

    $date = date("Y-m-d");

    if($currValue != $default_currency_caption) $currBalance = getCurrencyValue($date, $currValue, $row_merchant->pay_amount);


    include 'language_include.php';
	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Affiliate Network Pro</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="main.css"/>
<style type="text/css">
<!--
.tdheader {
	border: 1px solid #999999;
	background-color: #999999;
}
.tdheaderin {
	border-top: 1px none #999999;
	border-right: 1px solid #999999;
	border-bottom: 1px solid #999999;
	border-left: 1px solid #999999;
}
.tdheaderin2 {
	border-top: 1px none #999999;
	border-right: 1px solid #999999;
	border-bottom: 1px solid #999999;
	border-left: 1px none #999999;
}
.style2 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10px;
	color: #FFFFFF;
	font-weight: bold;
}
.lang {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	color: #000000;
	font-weight: normal;
}
.style3 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10px;
	color: #FFFFFF;
}
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	color: #666666;
}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
a {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10px;
	color: #000000;
	font-weight: bold;
}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
	color: #003399;
}
a:active {
	text-decoration: none;
}
.Ta {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	color: #FFCC66;
	font-weight: bold;
}
.Ta:link {
	text-decoration: none;
}
.Ta:visited {
	text-decoration: none;
}
.Ta:hover {
	text-decoration: underline;
	color: #FFFF33;
}
.Ta:active {
	text-decoration: none;
}
.af {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	color: #000000;
	font-weight: normal;
}
.af:link {
	text-decoration: none;
}
.af:visited {
	text-decoration: none;
}
.af:hover {
	text-decoration: underline;
	color: #333333;
}
.af:active {
	text-decoration: none;
}
.header_bg_white{
	background-image: url(images/white.gif);
}
.header_bg_yellow{
	background-image: url(images/yellow.gif);
}
-->
</style>
</head>
<body bgcolor="#ffffff">
<table width="775"  border="0" align="center" cellpadding="0" cellspacing="0" class="tablebdr">
	<tr>
		<td height="69" bgcolor="#000000">
<?php	
    include 'merchants_header.php';
?>
		</td>
	</tr>
	<tr>
		<td>
<?php
    include "process.php";
?>		
		</td>
	</tr>
	<tr>
		<td>
<?php    
	include "footer.php";

  ?>		
		</td>
	</tr>
</table>
</body>
</html>